// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';

import SurveyWrite from '@/views/SurveyWrite/index';


import SurveyAdd from '@/views/SurveyAdd/index';

import SurveyAll from '@/views/SurveyAll/index';

import Ecoin from '@/views/Ecoin/index'



// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [{
            path: '/Surveywrite/index',
            name: '问卷填写',
            component: SurveyWrite,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/SurveyAdd/index',
            name: '新建问卷',
            component: SurveyAdd,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/SurveyAll/index',
            name: '所有问卷',
            component: SurveyAll,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/Ecoin/index',
            name: '问卷激励',
            component: Ecoin,
            meta: {
                requireAuth: true
            }
        }
    ]
    }]
})